<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MTB CAT1 Peripheral driver library: Interrupt Functions</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen_style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><a href="http://www.cypress.com/"><img alt="Logo" src="IFXCYP_one-line.png"/></a></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">MTB CAT1 Peripheral driver library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__group__ctdac__functions__interrupts.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Interrupt Functions<div class="ingroups"><a class="el" href="group__group__ctdac.html">CTDAC        (Continuous Time Digital to Analog Converter)</a> &raquo; <a class="el" href="group__group__ctdac__functions.html">Functions</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">General Description</h2>
<p>This set of functions is related to the CTDAC interrupt. </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga5d848e8b2f4ebc0fa8112954ed57c7b5"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__ctdac__functions__interrupts.html#ga5d848e8b2f4ebc0fa8112954ed57c7b5">Cy_CTDAC_GetInterruptStatus</a> (const <a class="el" href="struct_c_t_d_a_c___type.html">CTDAC_Type</a> *base)</td></tr>
<tr class="memdesc:ga5d848e8b2f4ebc0fa8112954ed57c7b5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the interrupt status which gets set by the hardware when the CTDAC_VAL_NXT register value is transferred to the CTDAC_VAL register.  <a href="#ga5d848e8b2f4ebc0fa8112954ed57c7b5">More...</a><br /></td></tr>
<tr class="separator:ga5d848e8b2f4ebc0fa8112954ed57c7b5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga751d89f67434f47770b39b211ac488be"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__ctdac__functions__interrupts.html#ga751d89f67434f47770b39b211ac488be">Cy_CTDAC_ClearInterrupt</a> (<a class="el" href="struct_c_t_d_a_c___type.html">CTDAC_Type</a> *base)</td></tr>
<tr class="memdesc:ga751d89f67434f47770b39b211ac488be"><td class="mdescLeft">&#160;</td><td class="mdescRight">Clear the interrupt that was set by the hardware when the CTDAC_VAL_NXT register value is transferred to the CTDAC_VAL register.  <a href="#ga751d89f67434f47770b39b211ac488be">More...</a><br /></td></tr>
<tr class="separator:ga751d89f67434f47770b39b211ac488be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga92e7c185ae5ea83c19fbd32f9949b6ea"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__ctdac__functions__interrupts.html#ga92e7c185ae5ea83c19fbd32f9949b6ea">Cy_CTDAC_SetInterrupt</a> (<a class="el" href="struct_c_t_d_a_c___type.html">CTDAC_Type</a> *base)</td></tr>
<tr class="memdesc:ga92e7c185ae5ea83c19fbd32f9949b6ea"><td class="mdescLeft">&#160;</td><td class="mdescRight">Force the CTDAC interrupt to trigger using software.  <a href="#ga92e7c185ae5ea83c19fbd32f9949b6ea">More...</a><br /></td></tr>
<tr class="separator:ga92e7c185ae5ea83c19fbd32f9949b6ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae466daa55541a873790faee51e59061d"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__ctdac__functions__interrupts.html#gae466daa55541a873790faee51e59061d">Cy_CTDAC_SetInterruptMask</a> (<a class="el" href="struct_c_t_d_a_c___type.html">CTDAC_Type</a> *base, uint32_t mask)</td></tr>
<tr class="memdesc:gae466daa55541a873790faee51e59061d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Configure the CTDAC interrupt to be forwarded to the CPU interrupt controller.  <a href="#gae466daa55541a873790faee51e59061d">More...</a><br /></td></tr>
<tr class="separator:gae466daa55541a873790faee51e59061d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafff937917044bf47b415bb1fa9a7de6d"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__ctdac__functions__interrupts.html#gafff937917044bf47b415bb1fa9a7de6d">Cy_CTDAC_GetInterruptMask</a> (const <a class="el" href="struct_c_t_d_a_c___type.html">CTDAC_Type</a> *base)</td></tr>
<tr class="memdesc:gafff937917044bf47b415bb1fa9a7de6d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return whether the CTDAC interrupt is forwarded to the CPU interrupt controller as configured by <a class="el" href="group__group__ctdac__functions__interrupts.html#gae466daa55541a873790faee51e59061d">Cy_CTDAC_SetInterruptMask</a>.  <a href="#gafff937917044bf47b415bb1fa9a7de6d">More...</a><br /></td></tr>
<tr class="separator:gafff937917044bf47b415bb1fa9a7de6d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaeac6b6535bea7c9d2087f704a0515bfd"><td class="memItemLeft" align="right" valign="top">__STATIC_INLINE uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__group__ctdac__functions__interrupts.html#gaeac6b6535bea7c9d2087f704a0515bfd">Cy_CTDAC_GetInterruptStatusMasked</a> (const <a class="el" href="struct_c_t_d_a_c___type.html">CTDAC_Type</a> *base)</td></tr>
<tr class="memdesc:gaeac6b6535bea7c9d2087f704a0515bfd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the bitwise AND of <a class="el" href="group__group__ctdac__functions__interrupts.html#ga5d848e8b2f4ebc0fa8112954ed57c7b5">Cy_CTDAC_GetInterruptStatus</a> and <a class="el" href="group__group__ctdac__functions__interrupts.html#gae466daa55541a873790faee51e59061d">Cy_CTDAC_SetInterruptMask</a>.  <a href="#gaeac6b6535bea7c9d2087f704a0515bfd">More...</a><br /></td></tr>
<tr class="separator:gaeac6b6535bea7c9d2087f704a0515bfd"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga5d848e8b2f4ebc0fa8112954ed57c7b5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5d848e8b2f4ebc0fa8112954ed57c7b5">&#9670;&nbsp;</a></span>Cy_CTDAC_GetInterruptStatus()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE uint32_t Cy_CTDAC_GetInterruptStatus </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="struct_c_t_d_a_c___type.html">CTDAC_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return the interrupt status which gets set by the hardware when the CTDAC_VAL_NXT register value is transferred to the CTDAC_VAL register. </p>
<p>Once set, the CTDAC_VAL_NXT register is ready to accept a new value.</p>
<dl class="section note"><dt>Note</dt><dd>Interrupts are available in all update modes except <a class="el" href="group__group__ctdac.html#group_ctdac_updatemode_direct_write">Direct write</a>.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>Pointer to structure describing registers</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>0: Value not moved from CTDAC_VAL_NXT to CTDAC_VAL</li>
<li>1: Value moved from CTDAC_VAL_NXT to CTDAC_VAL</li>
</ul>
</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd></dd></dl>
<div class="fragment"><div class="line">    <span class="comment">/* Scenario: The CTDAC has interrupts enabled. Retrieve the interrupt</span></div><div class="line"><span class="comment">     * status to determine if the CTDAC is ready to accept a new value. */</span></div><div class="line">    </div><div class="line">    uint8_t intrStatus;</div><div class="line">    </div><div class="line">    <span class="comment">/* Get the interrupt status for a specific CTDAC instance on the device. */</span></div><div class="line">    intrStatus = <a class="code" href="group__group__ctdac__functions__interrupts.html#ga5d848e8b2f4ebc0fa8112954ed57c7b5">Cy_CTDAC_GetInterruptStatus</a>(CTDAC0);</div><div class="line"></div><div class="line">    <span class="comment">/* If the interrupt status is 1, the CTDAC is ready to accept a new value. */</span></div><div class="line">    <span class="keywordflow">if</span> (1UL == intrStatus)</div><div class="line">    {</div><div class="line">        <span class="comment">/* Set the next value to output. */</span></div><div class="line">    }</div></div><!-- fragment -->
</div>
</div>
<a id="ga751d89f67434f47770b39b211ac488be"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga751d89f67434f47770b39b211ac488be">&#9670;&nbsp;</a></span>Cy_CTDAC_ClearInterrupt()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE void Cy_CTDAC_ClearInterrupt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_c_t_d_a_c___type.html">CTDAC_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Clear the interrupt that was set by the hardware when the CTDAC_VAL_NXT register value is transferred to the CTDAC_VAL register. </p>
<p>The interrupt must be cleared with this function so that the hardware can set subsequent interrupts and those interrupts can be forwarded to the interrupt controller, if enabled.</p>
<dl class="section note"><dt>Note</dt><dd>Interrupts are available in all update modes except <a class="el" href="group__group__ctdac.html#group_ctdac_updatemode_direct_write">Direct write</a>.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>Pointer to structure describing registers</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None </dd></dl>

</div>
</div>
<a id="ga92e7c185ae5ea83c19fbd32f9949b6ea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga92e7c185ae5ea83c19fbd32f9949b6ea">&#9670;&nbsp;</a></span>Cy_CTDAC_SetInterrupt()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE void Cy_CTDAC_SetInterrupt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_c_t_d_a_c___type.html">CTDAC_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Force the CTDAC interrupt to trigger using software. </p>
<dl class="section note"><dt>Note</dt><dd>Interrupts are available in all update modes except <a class="el" href="group__group__ctdac.html#group_ctdac_updatemode_direct_write">Direct write</a>.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>Pointer to structure describing registers</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None </dd></dl>

</div>
</div>
<a id="gae466daa55541a873790faee51e59061d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae466daa55541a873790faee51e59061d">&#9670;&nbsp;</a></span>Cy_CTDAC_SetInterruptMask()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE void Cy_CTDAC_SetInterruptMask </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_c_t_d_a_c___type.html">CTDAC_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>mask</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Configure the CTDAC interrupt to be forwarded to the CPU interrupt controller. </p>
<dl class="section note"><dt>Note</dt><dd>Interrupts are available in all update modes except <a class="el" href="group__group__ctdac.html#group_ctdac_updatemode_direct_write">Direct write</a>.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>Pointer to structure describing registers</td></tr>
    <tr><td class="paramname">mask</td><td>The CTDAC only has one interrupt so the mask is one bit.<ul>
<li>0: Disable CTDAC interrupt request (will not be forwarded to CPU interrupt controller)</li>
<li>1: Enable CTDAC interrupt request (will be forwarded to CPU interrupt controller)</li>
</ul>
</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>None</dd></dl>
<dl class="section user"><dt>Function Usage</dt><dd></dd></dl>
<div class="fragment"><div class="line">    <span class="comment">/* Scenario: DMA will be used to update the DAC value. Disable the CTDAC interrupt. */</span></div><div class="line">    </div><div class="line">    <a class="code" href="group__group__ctdac__functions__interrupts.html#gae466daa55541a873790faee51e59061d">Cy_CTDAC_SetInterruptMask</a>(CTDAC0, 0UL);</div><div class="line">    </div></div><!-- fragment -->
</div>
</div>
<a id="gafff937917044bf47b415bb1fa9a7de6d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gafff937917044bf47b415bb1fa9a7de6d">&#9670;&nbsp;</a></span>Cy_CTDAC_GetInterruptMask()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE uint32_t Cy_CTDAC_GetInterruptMask </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="struct_c_t_d_a_c___type.html">CTDAC_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return whether the CTDAC interrupt is forwarded to the CPU interrupt controller as configured by <a class="el" href="group__group__ctdac__functions__interrupts.html#gae466daa55541a873790faee51e59061d">Cy_CTDAC_SetInterruptMask</a>. </p>
<dl class="section note"><dt>Note</dt><dd>Interrupts are available in all update modes except <a class="el" href="group__group__ctdac.html#group_ctdac_updatemode_direct_write">Direct write</a>.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>Pointer to structure describing registers</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The CTDAC only has one interrupt so the return value is either 0 or 1.<ul>
<li>0: Interrupt output not forwarded to CPU interrupt controller</li>
<li>1: Interrupt output forwarded to CPU interrupt controller </li>
</ul>
</dd></dl>

</div>
</div>
<a id="gaeac6b6535bea7c9d2087f704a0515bfd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gaeac6b6535bea7c9d2087f704a0515bfd">&#9670;&nbsp;</a></span>Cy_CTDAC_GetInterruptStatusMasked()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">__STATIC_INLINE uint32_t Cy_CTDAC_GetInterruptStatusMasked </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="struct_c_t_d_a_c___type.html">CTDAC_Type</a> *&#160;</td>
          <td class="paramname"><em>base</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return the bitwise AND of <a class="el" href="group__group__ctdac__functions__interrupts.html#ga5d848e8b2f4ebc0fa8112954ed57c7b5">Cy_CTDAC_GetInterruptStatus</a> and <a class="el" href="group__group__ctdac__functions__interrupts.html#gae466daa55541a873790faee51e59061d">Cy_CTDAC_SetInterruptMask</a>. </p>
<p>When high, the DAC interrupt is asserted and the interrupt is forwarded to the CPU interrupt controller.</p>
<dl class="section note"><dt>Note</dt><dd>Interrupts are available in all update modes except <a class="el" href="group__group__ctdac.html#group_ctdac_updatemode_direct_write">Direct write</a>.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">base</td><td>Pointer to structure describing registers</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><ul>
<li>0: Value not moved from CTDAC_VAL_NXT to CTDAC_VAL or not masked</li>
<li>1: Value moved from CTDAC_VAL_NXT to CTDAC_VAL and masked </li>
</ul>
</dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part
<div id="nav-path" class="navpath">
    <ul>
        <li class="footer">
            Generated for <b>MTB CAT1 Peripheral driver library</b> by <b>Cypress Semiconductor Corporation</b>.
            All rights reserved.
        </li>
    </ul>
</div>
-->
</body>
</html>
